<pre class="docs-method-signature"><code>point.adhereToRect(r)</code></pre>
<p>If the point lies outside the rectangle <code>r</code>, adjust the point so that it becomes the nearest point on the boundary of <code>r</code>.</p>
